package edu.sjsu.cs.gui;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JLabel;

public class ButtonListener implements ActionListener
{
   public ButtonListener(JLabel aLabel)
   {
      counter  = 0;
      label = aLabel;
   }
   public void actionPerformed(ActionEvent e)
   {
      counter++;
      label.setText("I was clicked " +counter+" times");
   }
   private int counter = 0;
   private JLabel label = null;



}
